# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年10月08日
"""
import pandas as pd
import numpy as np

arr = [[1, 2, 3],
       [4, 5, 6],
       [7, 8, 9]]

data = pd.DataFrame(arr, columns=list('xyz'), index=list('abc'))

print(data.apply(np.square))

